generateData <- function(.xsource,
                         .b2source,
                         .N,
                         .J,
                         .scale = 1
                         ) {
    suppressMessages({
        require("emIRT")
        require("pscl")
    }
                     )
    .Nsource <- nrow(.xsource)
    .Jsource <- nrow(.b2source)
    newx <- matrix(.xsource,
                   nrow = .N,
                   ncol = 1
                   )
    newa <- matrix(.b2source[, 2],
                   nrow = .J,
                   ncol = 1
                   )
    newb <- matrix(.b2source[, 1],
                   nrow = .J,
                   ncol = 1
                   )
    newb2 <- cbind(newa,
                   newb
                   )
    mu <- cbind(-1, newx) %*% t(newb2)
    ys <- mu + matrix(rnorm(.N * .J, sd = .scale),
                      nrow = .N
                      )
    y <- (ys > 0) * 1
    rc <- rollcall(y)
    rcFE <- convertRC(rc)
    return(list(x = newx,
                b2 = newb2,
                mu = mu,
                ystar = ys,
                y = y,
                rc1 = rc,
                rc2 = rcFE
                )
           )
}
